/**
 * 
 */
package com.googlecode.pcapj.bridj;

import org.bridj.Pointer;
import org.bridj.StructObject;
import org.bridj.ann.Field;

/**
	struct in_addr 
	{
	        u_int32_t        s_addr;
	};
 */
public class in_addr extends StructObject {
    public in_addr() { super(); }
    public in_addr(Pointer<? extends StructObject> pointer) { super(pointer); }

    @Field(0)
    public u_int32_t s_addr() {
            return this.io.getNativeObjectField(this, 0);
    }
    @Field(0) 
    public in_addr s_addr(u_int32_t s_addr) {
            this.io.setNativeObjectField(this, 0, s_addr);
            return this;
    }
    public int s_addrToint(){
    	return Pointer.pointerTo(s_addr()).as(Integer.class).getInt();
    }
}
